package cn.house.entity;

import java.io.Serializable;

import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

import org.hibernate.annotations.GenericGenerator;

import com.opensymphony.xwork2.inject.Scope.Strategy;

/**
 * 街道表
 * 
 * @author Administrator
 *
 */
@Entity
@Table(name = "street") // 表
public class Street implements Serializable {

	@Id
	private Integer id;

	private String name;

	// @Column(name = "DISTRICT_ID")
	// private Integer districtId;
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "`DISTRICT_ID`")
	private District district;

	public Street() {
		super();
	}

	public Street(Integer id, String name) {
		super();
		this.id = id;
		this.name = name;
	}

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public District getDistrict() {
		return district;
	}

	public void setDistrict(District district) {
		this.district = district;
	}

}
